import { pgTable, text, timestamp, integer } from 'drizzle-orm/pg-core'

export const emps = pgTable('emps', {
  id: text('id').primaryKey(),
  createdAt: timestamp('created_at').defaultNow().notNull(),
  updatedAt: timestamp('updated_at')
    .$onUpdate(() => /* @__PURE__ */ new Date())
    .notNull(),
  username: text('username').notNull().unique(),
  passwordHash: text('password_hash').notNull()
})

export const tags = pgTable('tags', {
  id: text('id').primaryKey(),
  createdAt: timestamp('created_at').defaultNow().notNull(),
  updatedAt: timestamp('updated_at')
    .$onUpdate(() => /* @__PURE__ */ new Date())
    .notNull(),
  name: text('name').notNull(),
  sortOrder: integer('sort_order'),
  remark: text('remark')
})

export * from './auth-schema'
